Visual Basic (Declaration) | |
---|---|
<ExtensionAttribute()> Public Overloads Shared Function Include(Of T)( _ ByVal query As IEntityQuery(Of T), _ ByVal expr As Expression(Of Func(Of T,Object)) _ ) As IEntityQuery(Of T) |
Visual Basic (Usage) | ![]() |
---|---|
Dim query As IEntityQuery(Of T) Dim expr As Expression(Of Func(Of T,Object)) Dim value As IEntityQuery(Of T) value = EntityQueryExtensions.Include(Of T)(query, expr) |
C# | |
---|---|
[ExtensionAttribute()] public static IEntityQuery<T> Include<T>( IEntityQuery<T> query, Expression<Func<T,object>> expr ) |
C++/CLI | |
---|---|
[ExtensionAttribute()] public: static IEntityQuery<T^>^ Includegeneric<typename T> ( IEntityQuery<T^>^ query, Expression<Func<T^,Object^>^>^ expr ) |
Parameters
- query
- An EntityQuery
- expr
- An expression returning the navigation property
Type Parameters
- T
Return Value
A new IEntityQuery with the defined query path.C# | ![]() |
---|---|
// Query for some customers, and include their orders. var query1 = mgr.Customers .Where(c => c.Country == "UK") .Include(c=> c.OrderSummaries); foreach (Customer c in query1) { Console.WriteLine("order count = " + c.OrderSummaries.Count); } |
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family